﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Web;
using Karkas.Core.TypeLibrary;

namespace Karkas.Core.DataUtil.BaseClasses
{
    public abstract class BaseBsWrapper<TYPE_LIBRARY_TIPI,DAL_TIPI, BS_TIPI> : BaseBsWrapperWithoutEntity
                where TYPE_LIBRARY_TIPI : BaseTypeLibrary, new()
        where DAL_TIPI : BaseDal<TYPE_LIBRARY_TIPI>, new()
        where BS_TIPI : BaseBs<TYPE_LIBRARY_TIPI, DAL_TIPI>, new()
    {
        public abstract BS_TIPI bs
        {
            get;
        }


        public BaseBsWrapper()
        {
        }



        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void Ekle(TYPE_LIBRARY_TIPI p1)
        {
            bs.Ekle(p1);
            return;
        }


        [DataObjectMethod(DataObjectMethodType.Update)]
        public void Guncelle(TYPE_LIBRARY_TIPI k)
        {
            bs.Guncelle(k);
        }
        [DataObjectMethod(DataObjectMethodType.Delete)]
        public void Sil(TYPE_LIBRARY_TIPI k)
        {
            bs.Sil(k);
        }


        public void DurumaGoreEkleGuncelleVeyaSil(TYPE_LIBRARY_TIPI k)
        {
            bs.DurumaGoreEkleGuncelleVeyaSil(k);
        }


      [DataObjectMethod(DataObjectMethodType.Select, true)]
        public List<TYPE_LIBRARY_TIPI> SorgulaHepsiniGetir()
        {
            return bs.SorgulaHepsiniGetir();
        }

      [DataObjectMethod(DataObjectMethodType.Select, false)]
        public List<TYPE_LIBRARY_TIPI> SorgulaHepsiniGetirSirali(params string[] pSiraListesi)
        {
            return bs.SorgulaHepsiniGetirSirali(pSiraListesi);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void TopluEkleGuncelleVeyaSil(List<TYPE_LIBRARY_TIPI> liste)
        {
            bs.TopluEkleGuncelleVeyaSil(liste);
        }

        public List<T1> SorgulaDetayTabloGetir<T1>(object degeri) where T1 : new()
        {
            return bs.SorgulaDetayTabloGetir<T1>(degeri);
        }
        public virtual List<TYPE_LIBRARY_TIPI> SorgulaKolonIsmiIle(string filtre, object oDegeri)
        {
            return bs.SorgulaKolonIsmiIle(filtre, oDegeri);
        }

        public virtual List<TYPE_LIBRARY_TIPI> SorgulaKolonIsmiIle(List<string> filtreListesi, List<object> degerListesi)
        {
            return bs.SorgulaKolonIsmiIle(filtreListesi, degerListesi);
        }
        public virtual List<TYPE_LIBRARY_TIPI> SorgulaKolonIsmiIle(string[] filtreListesi, object[] degerListesi)
        {
            return bs.SorgulaKolonIsmiIle(filtreListesi, degerListesi);
        }


    }
}
